<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	request.setAttribute("path", request.getContextPath());
%>
<script type="text/javascript">
$(function(){
	common.ajaxQuery("${root}/app/user/query/pop");
});
function selectAll(obj){
	 $("#dataList input[id*='userItem']").each(function(){
			$(this).prop("checked",$(obj).prop("checked"));
	}); 
}
</script>
<jsp:include page="../../base/master_js.jsp"></jsp:include>
<form class="form-horizontal" id="queryForm"  role="form">
	    <div class="form-group">
			    <label for="name" class="control-label col-sm-2">大区:</label>
			    <div class="col-sm-4">
					<select id="firstOrg" name="firstOrg" class="form-control" onchange="firstOrgChange(this,'secondOrg',true)">
						<option value=""></option>
						<c:forEach var="item" items="${firstOrgs}">
							<option value="${item.id }"><c:out value="${item.name }"/></option>
						</c:forEach>
					</select>
			    </div>
			    <label for="name" class="control-label col-sm-2">办事处:</label>
			    <div class="col-sm-4">
					<select id="secondOrg" name="secondOrg" class="form-control" >
					</select>
			    </div>
		</div>	
	   <div class="form-group">
			    <label for="name" class="control-label col-sm-2">账号:</label>
			    <div class="col-sm-4">
					<input type="text" class="form-control input-sm" name="id" id="id" />
			    </div>
			    <label for="mobile" class="control-label col-sm-2">名称:</label>
			    <div class="col-sm-4">
					<input type="text" class="form-control input-sm" name="name" id="name" />
			    </div>
		</div>
	 <div class="form-group">
	 		<div class="col-sm-12 text-center">
		      <button type="button" class="btn btn-primary btn-sm" onclick="common.ajaxQuery('${root}/app/user/query')">查询</button>
		    </div>
	 </div>
	</form>
	<div class="table-responsive">
	<table class="table table-bordered">
		<thead>
			<tr >
				<th class="col-sm-1 text-center">序号</th>
				<th class="col-sm-3 text-center">账号</th>
				<th class="col-sm-4 text-center">姓名</th>
				<th class="col-sm-1 text-center">
					<label class="checkbox-inline">
						<input id="selectAll"  onclick="selectAll(this)"  type="checkbox" >
					</label>
				</th>
			</tr>
		</thead>
		<tbody id="dataList">
		</tbody>
	</table>
	</div>
